package com.gome.ocean.dao.authority;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Repository;

import com.gome.ocean.dao.model.authority.Function;
import com.gome.ocean.dao.model.authority.ReplaceFun;

/**
 * 
 */
@Repository("functionDAO")
public interface FunctionDAO {

    int insertFunction(Function Function);

    int removeFunctionById(Long id);

    int updateFunction(Function Function);

    Function findFunctionById(Long id);

    List<Function> findFunctionByUrl(String url);

    List<Function> findAllFunctions(RowBounds rowBounds);

    List<Function> findFunctionsByIds(@Param("ids") List<Long> ids);

    List<Function> findFunctionByModuleId(@Param("moduleId") Long moduleId);

    List<Function> findFunctionByUrlAndType(@Param("url") String url, @Param("methodType") Integer methodType);

    public List<ReplaceFun> getAllIdByTableName(@Param("tableName") String tableName);

    public ReplaceFun getReplaceStrByTableNameAndId(Map<String, Object> map);

    public void updateFieldEmailByTableAndId(Map<String, Object> map);
}
